package com.api.gbhg.daiyanlu.Dao;

import weaver.conn.RecordSet;

public class BudgetImplementationRateDao {
public static RecordSet getTotalImplement(String nd,String sbdw,int state) {
    RecordSet rs = new RecordSet();
    String sql ;
    if (sbdw.equals("2")){
        sql = "select SUM(jf.ze) ze,SUM(jf.syed) syed from uf_jingfei jf join uf_jingfei_version jv on jf.requestId = jv.requestId \n" +
                " where jf.nd = "+nd+" and jv.sfwdlhsdw = "+state+" ";
    }else{
        sql = "select SUM(jf.ze) ze,SUM(jf.syed) syed from uf_jingfei jf join uf_jingfei_version jv on jf.requestId = jv.requestId \n" +
                " where jf.nd = "+nd+" and jv.sfwdlhsdw = "+state+" and jf.sbdw in ("+sbdw+") ";
    }

    rs.executeQuery(sql);
    return rs;
    }
}
